package com.baidumap.administrator.happystudy.model;

import com.ab.util.AbJsonUtil;

import java.util.List;

/**
 * 描述：
 * 作者：xiaoxing on 17/4/9 20:05
 * 邮箱：2235445233@qq.com
 */
public class ShopList {


    /**
     * code : 200
     * msg : success
     * data : [{"shop_id":"470","category_id":"22","community_id":null,"warehouse_id":"0","uid":"502","shop_name":"每每化妆品","logo":"/Uploads/2017-04-03/58e1f63adefaa.jpg","business_time":"9：30~22：30","delivery_type":"1","mobile":"15030199038","phone":"15030199038","address":"河北省石家庄市鹿泉区学府路","lng":"120.435829","lat":"36.138958","is_open":"1","product_numbers":"0","pay_type":"2","tuijian_numbers":"0","call_numbers":"0","dateline":"1491203642","shop_level":"0","shop_introduce":"最快十五分钟！违者举报，举报有奖","shop_abstract":"","qq":"","weichat":"","contact":"","introduce":null,"shop_star":"0","shop_sale":"0","distance":0.2774,"delivery_time":0},{"shop_id":"472","category_id":"22","community_id":null,"warehouse_id":"0","uid":"504","shop_name":"巧梓化妆品","logo":"/Uploads/2017-04-05/58e47f60c7a74.jpg","business_time":"8：30-21：00","delivery_type":"2","mobile":"1562689562","phone":"1562365895","address":"石家庄","lng":"24.0232","lat":"118.2356","is_open":"1","product_numbers":"0","pay_type":"2","tuijian_numbers":"0","call_numbers":"0","dateline":"1491369824","shop_level":"0","shop_introduce":"进口面膜，名牌香水，口红","shop_abstract":"","qq":"","weichat":"","contact":"","introduce":null,"shop_star":"0","shop_sale":"0","distance":6210.5369,"delivery_time":12420}]
     */

    private String code;
    private String msg;
    private List<DataBean> data;

    /**
     * 用json构造自己
     *
     * @param json
     */
    public ShopList(String json) {
        ShopList result = AbJsonUtil.fromJson(json, this.getClass());
        this.code = result.getCode();
        this.msg = result.getMsg();
        this.data = result.getData();

    }

    @Override
    public boolean equals(Object obj) {
        ShopList shopList = (ShopList) obj;
        return code.equals(shopList.code) &&
                msg.equals(shopList.msg) &&
                data.equals(shopList.data);
    }

    @Override
    public int hashCode() {
        String in = code + msg + data;
        return in.hashCode();
    }

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }

    public List<DataBean> getData() {
        return data;
    }

    public void setData(List<DataBean> data) {
        this.data = data;
    }

    public static class DataBean {
        /**
         * shop_id : 470
         * category_id : 22
         * community_id : null
         * warehouse_id : 0
         * uid : 502
         * shop_name : 每每化妆品
         * logo : /Uploads/2017-04-03/58e1f63adefaa.jpg
         * business_time : 9：30~22：30
         * delivery_type : 1
         * mobile : 15030199038
         * phone : 15030199038
         * address : 河北省石家庄市鹿泉区学府路
         * lng : 120.435829
         * lat : 36.138958
         * is_open : 1
         * product_numbers : 0
         * pay_type : 2
         * tuijian_numbers : 0
         * call_numbers : 0
         * dateline : 1491203642
         * shop_level : 0
         * shop_introduce : 最快十五分钟！违者举报，举报有奖
         * shop_abstract :
         * qq :
         * weichat :
         * contact :
         * introduce : null
         * shop_star : 0
         * shop_sale : 0
         * distance : 0.2774
         * delivery_time : 0
         */

        private String shop_id;
        private String category_id;
        private Object community_id;
        private String warehouse_id;
        private String uid;
        private String shop_name;
        private String logo;
        private String business_time;
        private String delivery_type;
        private String mobile;
        private String phone;
        private String address;
        private String lng;
        private String lat;
        private String is_open;
        private String product_numbers;
        private String pay_type;
        private String tuijian_numbers;
        private String call_numbers;
        private String dateline;
        private String shop_level;
        private String shop_introduce;
        private String shop_abstract;
        private String qq;
        private String weichat;
        private String contact;
        private Object introduce;
        private String shop_star;
        private String shop_sale;
        private double distance;
        private int delivery_time;

        @Override
        public boolean equals(Object obj) {
            ShopList.DataBean dataBean = (ShopList.DataBean) obj;
            return shop_id.equals(dataBean.shop_id);
        }

        @Override
        public int hashCode() {
            String in = shop_id;
            return in.hashCode();
        }

        public String getShop_id() {
            return shop_id;
        }

        public void setShop_id(String shop_id) {
            this.shop_id = shop_id;
        }

        public String getCategory_id() {
            return category_id;
        }

        public void setCategory_id(String category_id) {
            this.category_id = category_id;
        }

        public Object getCommunity_id() {
            return community_id;
        }

        public void setCommunity_id(Object community_id) {
            this.community_id = community_id;
        }

        public String getWarehouse_id() {
            return warehouse_id;
        }

        public void setWarehouse_id(String warehouse_id) {
            this.warehouse_id = warehouse_id;
        }

        public String getUid() {
            return uid;
        }

        public void setUid(String uid) {
            this.uid = uid;
        }

        public String getShop_name() {
            return shop_name;
        }

        public void setShop_name(String shop_name) {
            this.shop_name = shop_name;
        }

        public String getLogo() {
            return logo;
        }

        public void setLogo(String logo) {
            this.logo = logo;
        }

        public String getBusiness_time() {
            return business_time;
        }

        public void setBusiness_time(String business_time) {
            this.business_time = business_time;
        }

        public String getDelivery_type() {
            return delivery_type;
        }

        public void setDelivery_type(String delivery_type) {
            this.delivery_type = delivery_type;
        }

        public String getMobile() {
            return mobile;
        }

        public void setMobile(String mobile) {
            this.mobile = mobile;
        }

        public String getPhone() {
            return phone;
        }

        public void setPhone(String phone) {
            this.phone = phone;
        }

        public String getAddress() {
            return address;
        }

        public void setAddress(String address) {
            this.address = address;
        }

        public String getLng() {
            return lng;
        }

        public void setLng(String lng) {
            this.lng = lng;
        }

        public String getLat() {
            return lat;
        }

        public void setLat(String lat) {
            this.lat = lat;
        }

        public String getIs_open() {
            return is_open;
        }

        public void setIs_open(String is_open) {
            this.is_open = is_open;
        }

        public String getProduct_numbers() {
            return product_numbers;
        }

        public void setProduct_numbers(String product_numbers) {
            this.product_numbers = product_numbers;
        }

        public String getPay_type() {
            return pay_type;
        }

        public void setPay_type(String pay_type) {
            this.pay_type = pay_type;
        }

        public String getTuijian_numbers() {
            return tuijian_numbers;
        }

        public void setTuijian_numbers(String tuijian_numbers) {
            this.tuijian_numbers = tuijian_numbers;
        }

        public String getCall_numbers() {
            return call_numbers;
        }

        public void setCall_numbers(String call_numbers) {
            this.call_numbers = call_numbers;
        }

        public String getDateline() {
            return dateline;
        }

        public void setDateline(String dateline) {
            this.dateline = dateline;
        }

        public String getShop_level() {
            return shop_level;
        }

        public void setShop_level(String shop_level) {
            this.shop_level = shop_level;
        }

        public String getShop_introduce() {
            return shop_introduce;
        }

        public void setShop_introduce(String shop_introduce) {
            this.shop_introduce = shop_introduce;
        }

        public String getShop_abstract() {
            return shop_abstract;
        }

        public void setShop_abstract(String shop_abstract) {
            this.shop_abstract = shop_abstract;
        }

        public String getQq() {
            return qq;
        }

        public void setQq(String qq) {
            this.qq = qq;
        }

        public String getWeichat() {
            return weichat;
        }

        public void setWeichat(String weichat) {
            this.weichat = weichat;
        }

        public String getContact() {
            return contact;
        }

        public void setContact(String contact) {
            this.contact = contact;
        }

        public Object getIntroduce() {
            return introduce;
        }

        public void setIntroduce(Object introduce) {
            this.introduce = introduce;
        }

        public String getShop_star() {
            return shop_star;
        }

        public void setShop_star(String shop_star) {
            this.shop_star = shop_star;
        }

        public String getShop_sale() {
            return shop_sale;
        }

        public void setShop_sale(String shop_sale) {
            this.shop_sale = shop_sale;
        }

        public double getDistance() {
            return distance;
        }

        public void setDistance(double distance) {
            this.distance = distance;
        }

        public int getDelivery_time() {
            return delivery_time;
        }

        public void setDelivery_time(int delivery_time) {
            this.delivery_time = delivery_time;
        }
    }
}
